The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
What kind of commands are you talking about?
Yisc[NL]
S3 licensed
Quote from arda556 :So do you want anything from me?

Bass-Driver, Lapper'ın çalışmayı durdurmasına neden olan gerçek değerlere ihtiyaç duyar. Lapper durduğunda $X_Axis'in değeri nedir? Lapper durduğunda $Y_Axis hangi değere sahip olur? Lapper durduğunda $Z_Axis hangi değere sahip olur? Lapper durduğunda $Heading değeri ne olur? Lapper durduğunda $PLID hangi değere sahip olur? Lapper durduğunda $UCID hangi değere sahip olur?

Bass-Driver needs the actual values that cause Lapper to stop working. What value does $X_Axis have when Lapper stops? What value does $Y_Axis have when Lapper stops? What value does $Z_Axis have when Lapper stops? What value does $Heading have if Lapper stops? What value does $PLID have if Lapper stops? What value does $UCID have if Lapper stops?
Yisc[NL]
S3 licensed
Problem has to do with a joinrequest.
Some value is send, that cannot be handled properly by Lapper, which then crashes.
Ofcourse the value should not be able to crash the application, so that has to be investigated by Bass-Driver.
In the mean time you could check what kind of value is send and if there is anything you can do to prevent it from being send or to try and send it in the correct way.
Yisc[NL]
S3 licensed
I don't see any use of a counter.
When using a counter, you can add that to the name of the button to give it a dynamic name.
Like this:

<?php 
openGlobalButton
"yetkiligrs_".$counter,1,195,20,4,1,10,36,"^T^7Moderatör: " .GetCurrentPlayerVar"NickName")."");
?>

The counter should also be used to work out the new top/bottom position of the button.
Like this:


$default_top_bottom=195;
IF ($counter == 0)
THEN
$top_bottom=$default_top_bottom
ELSE
$new_position=$counter*5;
$top_bottom=$default_top_bottom-$new_position;
ENDIF

Then the button should be:

<?php 
openGlobalButton
"yetkiligrs_".$counter,1,$top_bottom,20,4,1,10,36,"^T^7Moderatör: " .GetCurrentPlayerVar"NickName")."");
?>

When thinking about it, using the counter in the name of the button, could cause trouble, when officials disconnect from the server, so it might be better to use there $userName in the name of the button.

Then the button should be:

<?php 
openGlobalButton
"yetkiligrs_".$userName,1,$top_bottom,20,4,1,10,36,"^T^7Moderatör: " .GetCurrentPlayerVar"NickName")."");
?>

Yisc[NL]
S3 licensed
The counter can be used to create a unique button name as well as to alter the position of the buttons.
I am not home, so cannot give exact instructions now, but basically it is like this:

OnLapperStart:
- initialise counter and set it to 0

OnConnect event

If connected player is an official:
- raise counter by one
- open button for that official, when counter is 0, top/bottom position are the default value you gave then, when counter is 1, top/bottom position is default value mines 5 (to show the button above the previous button


OnDisconnect event

If disconnected player is an official
- lower counter by one
- close the button of that official
Yisc[NL]
S3 licensed
You can do that, but have to give each button a unique name, otherwise they will overwrite each other. You could add the nickname of the officials to the button name, so they always will be unique.

*edit*
Thinking about it, you need to have a counter as well, to keep track of how many officials are connected. Based on that counter you have to change the position of the next button, to avoid them getting on top of each other.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
That's an easy one, add logging to Lapper when someone connects and write that to the Lapper database.
The next time someone comes on you can either show the last date/time and if none can be found, welcome the player as a new one.
Yisc[NL]
S3 licensed
Quote :No worries. I don't know why they are occasionally falsely detected.

When a new version of an executable goes out, it's not scanned by the populair virus scanners and is therefor detected by them. Once they got the time to scan it and see that it is safe, they will whitelist it and push that to their clients.
Yisc[NL]
S3 licensed
Glad to hear it's working.
For future reference, what happens when this is used?

$NewDate = Replace( GetLapperVar(ShortDate,+5),"/","\/");
$NewDate2 = Replace( GetLapperVar(ShortDate),"/","\/");

In most systems \ can be used to escape characters, so this might do the trick here as well.
Yisc[NL]
S3 licensed
I am not familiar with Discord, but to me it looks like some character in the message, is misunderstood by Discord, causing the message to get broken. The problem could be with the / which might have to be escaped to get them through. Since I don't know if escaping them is even possible, you might want to try and replace them. Have a go with this:

$NewDate = Replace( GetLapperVar(ShortDate,+5),"/","-");
$NewDate2 = Replace( GetLapperVar(ShortDate),"/","-");
Yisc[NL]
S3 licensed
I cannot spot any obvious issue, but am currently not at home to double check things within Lapper.
What happens if you add the following line after the line that is setting $NewDate2?
The line should be: WriteLine( $NewDate2 );
Now a value should be shown on the Lapper console, what is that value?
Yisc[NL]
S3 licensed
What is the line (or lines) of Lapper code you have?
It's hard to see what is wrong when we only have a screenshot to go on.
It looks the variable isn't correctly added to the text, but only the actual code can proof that theory.
Yisc[NL]
S3 licensed
often questions like this can be answered by reading through the file called Changes.txt
In that file I found this:


Changes from v5.924 to 5.925

1. Add new function to open private button for another player
Syntax :
openButton( username, idOfButton, left, top, width, height, interline, secondDisplayed, style, text[,optional_backCall] );

2. Add new function to close private button for another player
Syntax :
closeButton( username, idOfButton );

Yisc[NL]
S3 licensed
In 5 minutes I have put this script together.
There is no close button, but that is on purpose as I think people should be able to code that (there are examples enough to look at).

I've attached the script as a file as well.
Rename the extension to .lpr and make sure to add a reference to addonsused.lpr


<?php 
CatchEvent OnMSO
$userName$text # Player event
    
$idxOfFirtsSpace indexOf$text" ");

    IF( 
$idxOfFirtsSpace == -THEN
      $command 
$text;
      
$argv "";
    ELSE
      
$command subStr$text,0,$idxOfFirtsSpace );
      
$argv trimsubStr$text,$idxOfFirtsSpace ) );
    ENDIF

    SWITCH( 
$command )
        CASE 
"!ctrl":
            
control_lapper0,);
            BREAK;
    ENDSWITCH
EndCatchEvent

Sub control_lapper
$KeyFlags,$id )
    
### Set initial values for left/right and top/bottom coordinates ###
    
$left_right_control 54;
    
$top_bottom_control 50;
    
### End ###

    
openPrivButton"control_term_lapper",$left_right_control+1,$top_bottom_control+56,45,5,5,-1,32"^3Terminate Lapper"control_term_lapper);
    
openPrivButton"control_reload_lapper",$left_right_control+46,$top_bottom_control+56,45,5,5,-1,32"^3Reload Lapper"control_reload_lapper);
EndSub

Sub control_term_lapper
$KeyFlags,$id )
    IF ( 
UserIsAdmin$userName ) == )
    
THEN
      globalMsg
langEngine"%{main_lapclose}%" ) );
      
termLapper();
    ENDIF
EndSub

Sub control_reload_lapper
$KeyFlags,$id )
    IF ( 
UserIsAdmin$userName ) == )
    
THEN
      privMsg
("Restarting and reloading config!");
      
reload();
    ENDIF
EndSub
?>


Yisc[NL]
S3 licensed
Wow, that is more advanced/complicated than I thought off, but on the other end more doable at the same time.
My idea was that !v should cast a vote to end the race and when enough votes would have been given, another layout was loaded.
Your idea is a lot better.
Yisc[NL]
S3 licensed
I have given your request a quick try yesterday, but got stuck very early on as I have no idea how the voting system in LFS works and therefor how to program that in Lapper.
Yisc[NL]
S3 licensed
Have a look at this thread: https://www.lfs.net/forum/thread/92249
Yisc[NL]
S3 licensed
You have to send the data from Lapper to your website.
Yisc[NL]
S3 licensed
Lapper cannot connect to a mysql database.
It uses its own local database.
Yisc[NL]
S3 licensed
Quote from Viperakecske :First graphics progress about new lightning and stuff was in 2018... soon 5y ago and yet no public version Frown

So, what is your point?
If you don't like it here, you are free to leave.
Apparantly you did something wrong in the past and are proud to show that in your profile picture.
You have a new account and are still b*tching about the game at every possible moment.
Be pleased with you have and enjoy that or go and do something else and maybe check in once or twice a year.
Scawen only wants to deliver things at the highest quality possible and has proven that over and over again.
Let the guy do what he does best and at some point another gem comes out of the back.
Yisc[NL]
S3 licensed
Quote from HeRRC :I remember that last night we were on the server testing mods and some of the participants had problems with the download, is it because of that?
they usually take a long time, but sometimes it's several minutes.

Maybe this can be improved as we could improve the servers in Brazil that are not good for big events...

It has already been improved, well Scawen and Victor made an attempt at a fix.
See the below option and give that a try:

If you enable Options... Misc - Allow HTTP redirect [EXPERIMENTAL]
Yisc[NL]
S3 licensed
Quote from Scawen :How it relates to E-Challenge: on this thread there are some scripts designed to make it easy to set pit instructions to change tyres, when conditions change to wet or dry.

Is there a hidden wet condition in LFS? Uhmm
Yisc[NL]
S3 licensed
Thanks for the update.
Installed it over my 7.0.9.0 version, no problem.
Yisc[NL]
S3 licensed
Nobody is forcing you to stay Big grin
So if you feel all is sh*t here, feel free to move on.
Bye and close the door behind you please Wink
Yisc[NL]
S3 licensed
One of the downsides of Lapper is that there are no tutorials and not even much of a manual either. Most information can be found in the changelog and a few text files. This makes the learning curve very steep, but once you get the hang of it, almost everything can be build with Lapper. Just have a go your self, study scripts that come with Lapper and that are available on this forum. If you get stuck, start a new topic in the Lapper section of the LFS forum and we will try to help you.
FGED GREDG RDFGDR GSFDG